From: Keir Fraser Date: Thu, 3 Sep 2009 08:51:37 +0000 (+0100) Subject: vt-d: fix Dom0 S3 resume. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13385 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=4bda558243b36e6d97e3f0a08782efe734bf88b9;p=xen.git vt-d: fix Dom0 S3 resume. When resuming from Dom0 S3, here 'irq' is -1, so we can't use it at all. We should always use iommu->irq. With the patch applied on the current tip 20153 and using the 2.6.18 Dom0, Dom0 S3 works fine (at least on my DQ35). Signed-off-by: Dexuan Cui --- diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c index 2f045b4dff..b5131d86df 100644 --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -1602,7 +1602,7 @@ static int init_vtd_hw(void) struct acpi_drhd_unit *drhd; struct iommu *iommu; struct iommu_flush *flush = NULL; - int irq = -1; + int irq; int ret; unsigned long flags; struct irq_cfg *cfg; @@ -1621,8 +1621,8 @@ static int init_vtd_hw(void) iommu->irq = irq; } - cfg = irq_cfg(irq); - dma_msi_set_affinity(irq, cfg->domain); + cfg = irq_cfg(iommu->irq); + dma_msi_set_affinity(iommu->irq, cfg->domain); clear_fault_bits(iommu);